n = 3
m = 3
dp = [[0 for i in range(n)] for j in range(m)]
dp[0][1] = 1
print(dp)
# output:
# [[0, 1, 0], [0, 0, 0], [0, 0, 0]]

#二维数组按列相加
n = 3
m = 3
like = [[1, 2, 3], [4, 5, 6], [0, 0, 0]]
res = [0 for i in range(n)]
for i in range(n):
    for j in range(m):
        res[i] += like[j][i] # 这里的i是列号
print(res)
# [5, 7, 9]

like2=[]
like2.append([1, 2, 3])
like2.append([4, 5, 6])
